function GetSysLogs() {
	var myData = [
			['1', '2010-09-08 12:20:20',"admin", "添加预警策略", '192.168.0.1', "预警", 		   '添加test预警策略'],
			['2', '2010-09-08 12:20:20',"admin", "添加预警策略", '192.168.0.1', "预警", 		   '添加test预警策略'],
			['3', '2010-09-08 12:20:20',"admin", "添加预警策略", '192.168.0.1', "预警", 		   '添加test预警策略'],
			['4', '2010-09-08 12:20:20',"admin", "添加预警策略", '192.168.0.1', "预警", 		   '添加test预警策略'],
			['5', '2010-09-08 12:20:20',"admin", "添加预警策略", '192.168.0.1', "预警", 		   '添加test预警策略'],
			['6', '2010-09-08 12:20:20',"admin", "添加预警策略", '192.168.0.1', "预警", 		   '添加test预警策略']
		];                                                                        
	

    // shared reader
    var reader = new Ext.data.ArrayReader({}, [
       			{
							name : 'id'
						}, {
							name : 'time'
						}, {
							name : 'user'
						}, {
							name : 'context'
						}, {
							name : 'client'
						}, {
							name : 'object'
						}, {
							name : 'desc'
						}
    ]);

    var store = new Ext.data.GroupingStore({
            reader: reader,
            data: myData,
            sortInfo:{field: 'id', direction: "ASC"}
        });



	var nowpage = new Ext.Toolbar.TextItem('1');
	var countpage = new Ext.Toolbar.TextItem('共1页');
	var now_page = 0;
	var count_page = 0;
	var sm = new Ext.grid.CheckboxSelectionModel();
	var sysloggrid = new Ext.grid.GridPanel({
				store : store,
				columns : [sm, {
							id : 'id',
							header : 'id',
							width : 10,
							sortable : true,
							dataIndex : 'id',
							hidden : true
						}, {
							header : '时间',
							width : 100,
							sortable : true,
							dataIndex : 'time'
						}, {
							header : '操作者',
							width : 70,
							sortable : true,
							dataIndex : 'user'
						}, {
							header : '操作内容',
							width : 70,
							sortable : true,
							dataIndex : 'context'
						}, {
							header : '操作终端',
							width : 70,
							sortable : true,
							dataIndex : 'client'
						}, {
							header : '操作对象',
							width : 100,
							sortable : true,
							dataIndex : 'object'
						}, {
							header : '明细',
							width : 100,
							sortable : true,
							dataIndex : 'desc'
						}],
				sm : sm,
				view: new Ext.grid.GroupingView({
		            forceFit:true,
		            startCollapsed : true ,
		            groupTextTpl: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "条" : "条"]})'
		        }),
				tbar : [{
							text : '删除',
							tooltip : '删除',
							iconCls : 'delete',
							ref : '../removeBtn',
							disabled : true,
							handler : function() {
								var s = grid.getSelectionModel().getSelections();
								for (var i = 0; r = s[i]; i++) {
									store.remove(r);
								}
							}
						}, '-', {
							text : '查找',
							tooltip : '查找',
							iconCls : 'search',
							handler : function() {							
								SysLogsSearchWindows(SearchReturn);
							}
						}, '-', {
							text : '刷新',
							tooltip : '刷新',
							iconCls : 'refresh',
							handler : function() {							
								store.loadData(myData);
							}
						}],
				bbar : [{
					tooltip : '首页',
					handler : function() {
						reflashgriad(0);
					},
					iconCls : 'frist'
				}, {

					tooltip : '上一页',
					handler : function() {
						reflashgriad(now_page - 1);
					},
					iconCls : 'perv'
				}, nowpage, {

					tooltip : '下一页',
					handler : function() {
						reflashgriad(now_page + 1);
					},
					iconCls : 'next'
				}, {

					tooltip : '最后一页',
					handler : function() {
						reflashgriad(Math.ceil(count_page / 20) - 1);
					},
					iconCls : 'last'
				}, {
					xtype : "tbfill"
				}, countpage],
				stripeRows : true,
				autoExpandColumn : 'id',
				stateful : true,
				stateId : 'sysloggrid'
			});
	
	function SearchReturn(data){
		var jsondata = Ext.util.JSON.decode(data);
		
	}
	function reflashgriad(page) {
	}
	
	return sysloggrid;
}

function SysLogsSearchWindows(SearchReturn){

	var myData = [
					['1', '服务器1'],
					['2', '服务器2'],
					['3', '服务器3'],
					['4', '服务器4']
				 ];        
	var myData1 = [
					['1', '高危'],
					['2', '中危'],
					['3', '低危']
				 ];        

	var Search = new Ext.form.FormPanel({
				frame : true,
				layout : 'form',
				region : 'center',
				xtype : 'fieldset',
				bodyStyle : 'padding:10px;',
				items : [{
							xtype : 'checkboxgroup',
							fieldLabel : '起始时间',
							name : 'start',
							id : 'start',
							columns : 2,
							vertical : true,
							items : [{
										xtype : 'datefield',
										name : 'startdate1',
										id   : 'startdate1',
										format: 'Y-m-d',
										value:'${startdate}'
									}, {
										xtype : 'timefield',
										name : 'starttime1',
										id   : 'starttime1',
										value:'00:00',
										format: 'H:i'
	
									}]
						},{
							xtype : 'checkboxgroup',
							fieldLabel : '结束时间',
							name : 'end',
							id : 'end',
							columns : 2,
							vertical : true,
							items : [{
										xtype : 'datefield',
										name : 'enddate1',
										id   : 'enddate1',
										format: 'Y-m-d',
										value:'${startdate}'
									}, {
										xtype : 'timefield',
										name : 'endtime1',
										id   : 'endtime1',
										value:'00:00',
										format: 'H:i'
									}]
						}, {
								xtype : 'textarea',
								name : 'context',
								fieldLabel : '关键字',
								anchor : '100%'
							}
						]

			});

	var searchWindows = new Ext.Window({
				layout : 'border',
				width : 500,
				height : 250,
				title : "查找",
				modal : true,
				resizable : true,
				maximizable : true,
				iconCls : 'search',
				items : [Search],
				plain : true
			});
	searchWindows.addButton({
				text : "查找",
				handler : function() {
					var data = "{startdate:'" + Ext.get("startdate").getValue() + "',enddate:'" + Ext.get("enddate").getValue() + "',context:'" + Ext.get("context").getValue() + "'}";
					SearchReturn(data)
					searchWindows.close();
				}
			});
	searchWindows.addButton({
				text : '取 消',
				handler : function() {
					searchWindows.close();
				}
			});
	searchWindows.show();
}